Skip to content

[RFC] kernel: add patch size analysis and detailed decomposition reporting#73

Open
captain5050 wants to merge 1 commit into
masoncl:mainfrom
captain5050:patch-size-upstream
Open

[RFC] kernel: add patch size analysis and detailed decomposition reporting#73
captain5050 wants to merge 1 commit into
masoncl:mainfrom
captain5050:patch-size-upstream

Conversation

@captain5050

Copy link
Copy Markdown
Contributor

A frequently seen human review analysis is in patch size. It is also something argued over, as patch decomposition can be a tricky problem. These changes aim to say when a patch is appropriately sized or to give a decomposition recommendation for medium and larger patches when they aren't appropriately sized. I've tested this with patches for perf and synthetic examples, but I believe the change itself may be controversial hence saying this PR is something of an RFC rather than something I necessarily expect to be merged. Thanks!

Implement a systematic patch size analysis and decomposition protocol
for kernel reviews. This change adds a classification system for
patch sizes (XS to XL) based on line delta and introduces a logical
decomposition workflow for patches that are too large or conceptually
diverse.

Key features:
- New kernel/patch-size.md defines size categories and decomposition
  logic (e.g., the 80% rule and conceptual integrity checks).
- Integrated TASK 0.5 into review-core.md to trigger analysis early
  in the review process.
- Reinforced reporting requirements using MANDATORY and CRITICAL
  directives to ensure agents provide detailed blueprints (commit
  messages and code changes) for suggested splits.
- Updated inline-template.md with a dedicated section and sample
  for patch decomposition recommendations.
- Utilized TodoWrite and restricted context clearing to ensure
  decomposition data persists through the final report generation.

Signed-off-by: Ian Rogers <irogers@google.com>
@masoncl

masoncl commented Jun 10, 2026

Copy link
Copy Markdown
Owner

I definitely think this is something we should tackle, but it probably falls into the per-subsystem subjective knobs that we'll want to tune. The 'patch is too big' rule is pretty universal, but I'm guessing different subsystems will have different opinions about AI discussing it.

I'm heading on vacation on Friday so I'm going to park this one for a bit, but lets discuss on the sashiko list?

@captain5050

Copy link
Copy Markdown
Contributor Author

Thanks Chris! I could argue either way whether this should be subsystem specific or global. I sent the email to the mailing list as requested:
https://lore.kernel.org/sashiko/CAP-5=fWmn9+LT-4VeAm6JwTM=FB071w-Oa2QXDROLK7VDXcfow@mail.gmail.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants